<?php
include('jxc_inc_head.php');
$id=$wu->request_int('id');
?>
<div class="btns"><a href="jxc_product_list.php">返回商品列表</a> <a href="jxc_productlog_list.php">查看最近进销日志</a></div>
<table cellpadding="0" cellspacing="0" border="1">
	<tr><th>摘要信息</th><th>统计信息</th><th>其他信息</th></tr>
	<?php
		$sqlid=$id?" and b.ID=$id ":'';
		$pager=new pagerhelper();
		$pager->setquery("tproductlog a left join tproductgoods b on a.ProductID=b.ID left join tgeneraldata c on a.ProviderID=c.ID left join tgeneraldata opttype on a.OperateID = opttype.Value left join tusermember u on a.UserName=u.UserName where opttype.ExTags='operatetype' $sqlid",'a.*, b.Name as ProductName, c.Name as ProviderName, opttype.Name as OperateName, u.Name as RealName','a.CreatedTime desc');
		if($pager->recordset){
			$i=1;
			foreach($pager->recordset as $row){
				echo '<tr><td><b>序号：</b>'.$i.'<br /><b>名称：</b>'.$row['ProductName'].'<br /><b>条码：</b>'.$row['Barcode'].'<br /><b>操作类型：</b>'.$row['OperateName'].'</td><td><b>库存：</b>'.$row['Stock'].'<br /><b>数量：</b>'.$row['Quantity'].'<br /><b>价格：</b>'.$row['Price'].'<br /><b>金额：</b>'.$row['Amount'].'</td><td><b>进货时间：</b>'.$row['OperateTime'].'<br /><b>录入时间：</b>'.$row['CreatedTime'].'<br /><b>采购员</b>'.$row['RealName'].'<br /><b>批发商</b>'.$row['ProviderName'].'</td></tr>';
				$i++;
			}
		}
	?>
</table>
<div class="pager"><?php echo $pager->get_pagerbar(); ?></div>
<?php
	include('jxc_inc_foot.php');
?>
